Skip to main content

Android, Google Maps getting more accurate device orientation

Besides using Live View and your camera for VPS, Google has a new device orientation solution for Android map developers with the Fused Orientation Provider (FOP) API in Play services.

Device orientation, or attitude, is used as an input signal for many use cases: virtual or augmented reality, gesture detection, or compass and navigation – any time the app needs the orientation of a device in relation to its surroundings.

This is still a tricky problem given that GPS and compasses might not be completely reliable, especially in dense, urban environments.  

We’ve heard from developers that orientation is challenging to get right, with frequent user complaints when orientation is incorrect. A maps app should show the correct direction to walk towards when a user is navigating to an exciting restaurant in a foreign city!

There is a new Fused Orientation Provider (FOP) API in Google Play services that “provides more consistent behavior and high performance across devices.” Returning device orientation and heading, it works by fusing signals from accelerometer, gyroscope and magnetometer, while compensating for “lower quality sensors and OEM implementations.” The API also works to:

  • Synchronize sensors running on different clocks and delays;
  • Compensate for the hard iron offset (magnetometer bias);
  • Fuse accelerometer, gyroscope, and magnetometer measurements to determine the orientation of the device in the world;
  • Compensate for gyro drift (gyro bias) while moving;
  • Produce a realistic estimate of the compass heading accuracy.

Google Maps uses FOP, including for heading, which was “recently added changes to better cope with magnetic disturbances, to improve the reliability of the cone” found in the app. 

The Play services (Android 5 Lollipop and newer) nature “means that there is no implementation variance across different manufacturers” and that algorithm updates can be rolled out quickly.

It complements the existing Android Rotation Vector with an easy transition path offered for app developers. 

FTC: We use income earning auto affiliate links. More.

You’re reading 9to5Google — experts who break news about Google and its surrounding ecosystem, day after day. Be sure to check out our homepage for all the latest news, and follow 9to5Google on Twitter, Facebook, and LinkedIn to stay in the loop. Don’t know where to start? Check out our exclusive stories, reviews, how-tos, and subscribe to our YouTube channel

Comments

Author

Avatar for Abner Li Abner Li

Editor-in-chief. Interested in the minutiae of Google and Alphabet. Tips/talk: abner@9to5g.com

Manage push notifications

notification icon
We would like to show you notifications for the latest news and updates.
notification icon
You are subscribed to notifications
notification icon
We would like to show you notifications for the latest news and updates.
notification icon
You are subscribed to notifications